package com.tsing.cedap.rest.vo.reqVo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author TheTsing
 * @create 2022-03-01 10:25
 */
@Getter
@Setter
@Accessors(chain = true)
public class WebLoginReqVo {

    @ApiModelProperty("登录方式 1 验证码  2 密码")
    @NotNull(message = "type不能为空")
    @Range(min = 1, max = 2, message = "只能传入1或者2，1 验证码  2 密码")
    private Integer type;

    @NotBlank(message = "手机号不能为空")
    private String phone;

    @ApiModelProperty("登录凭证")
    @NotBlank(message = "登录凭证不能为空")
    private String credential;

}
